package com.itheima.test10;

public class Test {

    public static void main(String[] args) {
        new InterA(){
            @Override
            public void sing() {

            }
        }.sing();
        //多态
        InterB interB = new InterB() {
            @Override
            public void sing() {

            }

            @Override
            public void dance() {

            }
        };
        interB.sing();
        interB.dance();

        new InterC(){
                     @Override
                     public void rap() {

                     }

                     @Override
                     public void basketball() {

                     }
                 }.basketball();

    }
}


interface  InterA{
    void sing();
}

interface  InterB{
    void sing();
    void dance();
}

interface InterC{
    void rap();
    void basketball();
}